package com.example.userconsumer.controller;

import com.example.userconsumer.service.FeignService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author TonySong
 * @date 2024/4/16 0016
 * @time 11:03
 */
@RestController
public class UserConsumer {

    @Resource
    private FeignService  feignService;

    @Value("${server.port}")
    private Integer port;
    @GetMapping("/list")
    public String list(){
        return "消费者"+port+"\n"+feignService.findAll();
    }
}
